package com.fortune.rainshinesystem.service.impl;

import com.fortune.rainshinecommon.model.system.LoginRecord;
import com.fortune.rainshinesystem.mapper.LoginRecordMapper;
import com.fortune.rainshinesystem.service.LoginRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class LoginRecordServiceImpl implements LoginRecordService {
    @Autowired
    private LoginRecordMapper loginRecordMapper;

    @Override
    public boolean add(LoginRecord loginRecord) {
        loginRecord.setCreateTime(new Date());
        return loginRecordMapper.insert(loginRecord) > 0;
    }
}
